defmodule Partizan.Makine do
  use GenServer
  require Logger

  def start_link() do
    GenServer.start_link __MODULE__, %{}
  end
  @moduledoc """
  Documentation for Partizan.
  """

  @doc """
  Hello world.

  ## Examples

      iex> Partizan.hello()
      :world

  """
  def hello do
    :world
  end
  
  def init(_state) do
    Logger.info "PArixzannn server started"
    port = Application.get_env(:partizan, :listen_port)
    ip = Application.get_env(:partizan, :listen_ip) 
    :partisan_config.set(:listen_addrs,[%{ip: ip, port: port}])
    state = :partisan.start
    {:ok, state}
  end
end
